package com.itheima.project.hystrix;

import com.itheima.project.basic.ResponseWrap;
import com.itheima.project.core.enums.trade.TradingEnum;
import com.itheima.project.feign.TradingFeign;
import com.itheima.project.utils.ResponseWrapBuild;
import com.itheima.project.vo.trade.RefundRecordVo;
import com.itheima.project.vo.trade.TradingVo;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @ClassName TradingHystrix.java
 * @Description TradingFeign的Hystrix
 */
@Component
public class TradingHystrix implements TradingFeign {

    @Override
    public ResponseWrap<List<TradingVo>> findTradingByTradingState(String tradingState) {
        return ResponseWrapBuild.build(TradingEnum.LIST_TRADE_STATE_FAIL,null);
    }

    /***
     * @description 按交易状态查询退款记录
     * @param refundStatus
     * @return
     */
    @Override
    public ResponseWrap<List<RefundRecordVo>> findReFundRecordByRefundStatus(String refundStatus) {
        return ResponseWrapBuild.build(TradingEnum.LIST_TRADE_STATE_FAIL, null);
    }
}
